#ifndef CAMERADIALOG_H
#define CAMERADIALOG_H

#include "ui_CameraDialog.h"
#include <QtGui>
#include <iostream>

#define OPTION_LOCAL_CAMERA 0
#define OPTION_IP_CAMERA    1

typedef struct {
    QString deviceId;
    QString ipUrl;
    QString ipPort;
    QString ipUser;
    QString ipPass;
    int     option;
} Camera_Params;

class CameraDialog : public QDialog, private Ui::Dialog {
    Q_OBJECT

public:
    CameraDialog(Camera_Params &camParams, QWidget *parent=0);
    ~CameraDialog();

private:
    Camera_Params &camParams;
    bool           validIp;

private slots:
    void on_buttonBox_rejected();
    void on_buttonBox_accepted();

    void on_lineIp_textChanged(const QString &arg1);
    void on_linePort_textChanged(const QString &arg1);

signals:
    void data_ready();
};

#endif // CAMERADIALOG_H
